package java_methods;

public class JavaMethod2 {
	// Method add returns sum of two input values
	
	int add (int a, int b) {
		return a + b;
	}
	
	int multiply (int a, int b) {
		return a * b;
	}
	
	int subtract (int a, int b) {
		return a - b;
	}
	
	public static void main(String[] args) {
		JavaMethod2 ref = new JavaMethod2();
		
		System.out.println(ref.add(10,20));
		System.out.println(ref.add(ref.add(3, 2), ref.multiply(4, 3)));
		int c = ref.subtract(ref.add(3, 5), ref.subtract(10, 2));
		System.out.println(ref.add(c, 30));
	}
}
